package cn.yuanqiao.archive.appManager.mapper;

import cn.yuanqiao.archive.appManager.domain.TenantCodeRule;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author zjj
 * @date 2023/6/16
 */
public interface TenantCodeRuleMapper {
    int insertTenantCodeRule(TenantCodeRule tenantCodeRule);

    int createCodeRuleTable(@Param("tableName") String tableName);

    void initCodeRule(@Param("tableName")String tableName, @Param("categoryIds") String categoryIds);

    List<TenantCodeRule> getCodeRuleModel(Long categoryId);

    /**
     * 查询manage
     *
     * @param Id manage主键
     * @return manage
     */
    public TenantCodeRule selectYqdaCoderuleModelById(@Param("Id") Long Id, @Param("tableName") String tableName);

    /**
     * 查询manage列表
     *
     * @param yqdaCoderuleModel manage
     * @return manage集合
     */
    public List<TenantCodeRule> selectYqdaCoderuleModelList(TenantCodeRule yqdaCoderuleModel);


    /**
     * 修改manage
     *
     * @param yqdaCoderuleModel manage
     * @return 结果
     */
    public int updateYqdaCoderuleModel(TenantCodeRule yqdaCoderuleModel);

    /**
     * 删除manage
     *
     * @param Id manage主键
     * @return 结果
     */
    public int deleteYqdaCoderuleModelById(Long Id);

    /**
     * 批量删除manage
     *
     * @param Ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteYqdaCoderuleModelByIds(@Param("Ids") Long[] Ids, @Param("tableName") String tableName);

    List<TenantCodeRule> selectYqdaCoderuleModelListNotself(TenantCodeRule hasyqdaCoderuleModel);

    Long selectIdByRqAndCateId(@Param("categoryId") Long categoryId, @Param("rq") Integer rq, @Param("tableName") String tableName);
}
